<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>补充2仿京东左侧菜单</title>
    <style>
        h1{
            width: 300px;
            background-color: #b3191b;
            height: 60px;
            line-height: 60px;
            margin: 0;
            color: #fff;
            font-size: 25px;
            font-weight: 400;
            padding-left: 15px;
            box-sizing: border-box;
        }
        ul{
            list-style: none;
            padding: 0;
            margin: 0;
        }
        li{
            width: 300px;
            height: 40px;
            line-height: 40px;
            background-color: #c81622;
            box-sizing: border-box;
            padding-left: 15px;
            color: #fff;
            position: relative;
        }
        li::before{
            display: block;
            content: "";
            width: 10px;
            height: 10px;
            position: absolute;
            right: 13px;
            top: 15px;
            background: url(./images/bg.png)center center no-repeat;
            background-size: cover;
        }
    </style>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="box">
        <h1>全部商品分类</h1>
        <ul>
            <li v-for="item in arr">{{item.title}}</li>
        </ul>
    </div>
    <script>
        var xm=new Vue({
            el:"#box",
            data:{
                arr:[
                    {title:"家用电器"},
                    {title:"手机 数码 相机"},
                    {title:"电脑 办公"},
                    {title:"家居 家具 家装"},
                    {title:"男装 女装 珠宝"},
                    {title:"鞋靴 箱包 钟表"}

                ]
            }
        })
    </script>
</body>
</html>